home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 8824 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: sage.cgd.ucar.edu!jadams
  2. From: jadams@sage.cgd.ucar.edu (James Adams)
  3. Newsgroups: comp.lang.c++
  4. Subject: C++ equivalents of fread(), fwrite(), fflush() ?
  5. Date: 26 Feb 1996 21:46:23 GMT
  6. Organization: National Center for Atmospheric Research
  7. Distribution: world
  8. Message-ID: <4gt9nf$lef@ncar.ucar.edu>
  9. Reply-To: jadams@sage.cgd.ucar.edu
  10. NNTP-Posting-Host: sage.cgd.ucar.edu
  11.  
  12. Hello,
  13.  
  14.     I am converting some software I've written in C to C++ (mainly
  15. for the practice).  I'd like to start using the C++ methods of reading
  16. and writing to files, and I've been amazed at the lack of info regarding
  17. this topic in the C++ books I've found.
  18.  
  19.     I've been able to determine that there is a <fstream.h> which
  20. makes available ofstream, ifstream, and fstream objects.  I have yet to
  21. find any reference which explains how to use these objects.  What I want
  22. is an explanation of what the member functions are for these classes,
  23. the parameters they take, etc.
  24.  
  25.     Essentially all I need to do is replace fread(), fwrite(), and
  26. fflush() with their C++ equivalents (I guess I need fopen() and fclose()
  27. equivalents as well).  Please let me know if you know of a reference
  28. which explains these (an online reference would be heavenly), or if you
  29. have any suggestions as to what I should be searching for.
  30.  
  31.     Any suggestions are greatly appreciated !
  32.  
  33.  
  34. -James
  35. -- 
  36. ---------------------------------------------------------------------------
  37. James Adams                               Email: jadams@ucar.edu
  38. National Center for Atmospheric Research  Phone: (303) 497-1356
  39. Boulder, Colorado                         Fax:   (303) 497-1348
  40.  
  41.     WWW:  http://www.cgd.ucar.edu/ccr/jadams/home.html
  42.